package com.ccrfid.rmc6.resource.dbg;

import com.ccrfid.rmc6.lbservice3.manager.LocationManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.Set;

@Path("dbg")
@Produces(MediaType.APPLICATION_JSON)
public class LocationManagerDebugResource {
    private static final Logger logger = LoggerFactory.getLogger(LocationManagerDebugResource.class);

    @Autowired
    private LocationManager locationManager;

    @GET
    @Path("location/{locationId}/personnels")
    public Set<Long> getPersonnelIdSetInLocation(@PathParam("locationId") Long locationId) {
        return locationManager.getLocationPersonnelInfo(locationId).getPersonnelIdSet();
    }
}
